package com.nulstudio.sppm.network;

import java.util.Objects;

public final class CreateSupplierRequest {
    private final String name, contact, phone, email, address;

    public CreateSupplierRequest() {
        this.name = null;
        this.contact = null;
        this.phone = null;
        this.email = null;
        this.address = null;
    }

    public CreateSupplierRequest(String name, String contact, String phone, String email, String address) {
        this.name = name;
        this.contact = contact;
        this.phone = phone;
        this.email = email;
        this.address = address;
    }

    public String getName() {
        return name;
    }

    public String getContact() {
        return contact;
    }

    public String getPhone() {
        return phone;
    }

    public String getEmail() {
        return email;
    }

    public String getAddress() {
        return address;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        CreateSupplierRequest that = (CreateSupplierRequest) o;
        return Objects.equals(name, that.name) && Objects.equals(contact, that.contact) && Objects.equals(phone, that.phone) && Objects.equals(email, that.email) && Objects.equals(address, that.address);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, contact, phone, email, address);
    }
}
